package com.ddx.service;


import com.ddx.common.exception.ResultModel;
import com.ddx.dto.ShoppingOrderVo;
import com.ddx.dto.ShoppingPayVo;
import com.ddx.dto.ShoppingSettleVo;
import com.ddx.dto.SupplierOrderDto;
import com.ddx.pojo.ShoppingCart;
import com.ddx.pojo.ShoppingPayFlowWithBLOBs;
import org.omg.CORBA.Object;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author dudianbo
 * @ClassName: ${CLASSNAME}
 * @Description: ${DESCRIPTION}
 * @date 2018/9/5
 */
public interface IShoppingOrderService {

    /**
     * 创建订单
     *
     * @param shoppingOrderVo
     */
    ShoppingPayVo createOrder(ShoppingOrderVo shoppingOrderVo);

    /**
     * 确认生成订单页面
     *
     * @param shoppingCarts
     */
    ShoppingSettleVo createSettlePage(List<ShoppingCart> shoppingCarts, String userId);

    /**
     * 支付成功
     *
     * @param shoppingPayFlow
     */
    void paySuccess(ShoppingPayFlowWithBLOBs shoppingPayFlow);

    /**
     * d订单信息
     *
     * @param orderId
     */
    ShoppingOrderVo orderInfo(String orderId);

    /**
     * 订单取消
     *
     * @param orderId
     */
    void orderCancal(String orderId);

    /**
     * 确认收货
     *
     * @param orderId
     */
    void orderConfirm(String orderId);

    /**
     * 订单list
     *
     * @param userId
     * @param status
     * @return
     */
    List<ShoppingOrderVo> list(int userId, String status) throws Exception;

    /**
     * 查看物流状态
     *
     * @param orderId
     * @return
     */
    Map<String, String> orderStatus(String orderId) throws Exception;
    /**
     * 查看物流状态
     *
     * @param shoppingOrderVo
     * @return
     */
    void editWuLiu(ShoppingOrderVo shoppingOrderVo) throws Exception;

    Map<Integer, BigDecimal> getProductSaleAmount(List<Integer> productIdList);

    /**
     * 获取供应商订单列表
     *
     * @param userId
     * @param supplierOrderDto
     * @return
     */
    ResultModel getOrderLiftForSupplier(int userId, SupplierOrderDto supplierOrderDto);

    ResultModel send(String orderId, String companyName, String expressNo);

    ResultModel submitOrder(String userId, String productId, Integer productNumber, String userAddressId);
}
